Skip to content

Conversation

@laurit
Copy link
Contributor

@laurit laurit commented Sep 13, 2024

#12084 changed the unit to seconds but forgot to convert the value from millis to seconds

@trask trask merged commit 521109e into open-telemetry:main Sep 13, 2024
56 checks passed
@egahlin
Copy link

egahlin commented Sep 14, 2024

> DurationUtil.millisToSeconds(ev.getLong(Constants.DURATION))

This looks strange. The raw value of the "duration" field is in ticks and the conversion factor depends on the platform and machine. The reasonable thing is to do ev.getDuration().toMillis() and let JFR do the conversion.

@laurit laurit deleted the gc-metrics-seconds branch September 15, 2024 10:34
@laurit
Copy link
Contributor Author

laurit commented Sep 15, 2024

> DurationUtil.millisToSeconds(ev.getLong(Constants.DURATION))

This looks strange. The raw value of the "duration" field is in ticks and the conversion factor depends on the platform and machine. The reasonable thing is to do ev.getDuration().toMillis() and let JFR do the conversion.

@egahlin Thanks for reporting this. I have created #12256 to address this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants